<%@ page language="java" contentType="text/html; charset=utf-8"
         pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>部门添加</title>
    <link href="<%=basePath%>css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%=basePath%>js/jquery.min.js"></script>
    <script type="text/javascript">
        $(function(){
            $('tbody tr:odd').addClass("trLight");

            $(".select-all").click(function(){
                if($(this).attr("checked")){
                    $(".checkBox input[type=checkbox]").each(function(){
                        $(this).attr("checked", true);
                    });
                }else{
                    $(".checkBox input[type=checkbox]").each(function(){
                        $(this).attr("checked", false);
                    });
                }
            });

        });
        function goback(){
            window.location.href = "<%=basePath%>deptListController";
        }
        function checkName(){
              //各自组内成员补充核心的校验代码
        }
    </script>
    <style type="text/css">
        body {
            background:#FFF
        }
        #message{
            font-style: italic;
            font-size: larger;
            color:green;
        }
    </style>
</head>
<body>
<form method="post" action="<%=basePath%>deptAddController" method="post" name="ThisForm">
    <input type="hidden" name="createid" value="${suser.id}">
    <div id="contentWrap">
        <!--表格控件 -->
        <div id="widget table-widget">
            <div class="pageTitle">科室添加</div>
            <label id="message">${success}</label>
            <div class="pageInfo">
                <table>
                    <tr>
                        <td width="20%" align="right">科室ID</td>
                        <td width="20%"><input type="text" id="departid" name="departid" readonly value="${dept.departid}"/></td>
                        <td width="10%" align="right">科室名称</td>
                        <td width="50%"><input type="text" id="name" name="name" value="${dept.name}" onblur="checkName()"/></td>
                    </tr>
                    <tr>
                        <td colspan="4" align="center">
                            <c:if test="${flag!='1'}">
                                <input type="submit" value="确定" />
                            </c:if>
                            &nbsp;
                            <input type="button" value="返回" onclick="goback()"/>
                        </td>
                    </tr>
                </table>
            </div>
        </div><!-- #widget -->
    </div>

</form>
</body>
</html>
